﻿using System.Collections.Generic;

namespace dk.Helper.Base
{
    public interface IPlayers
    {
        /// <summary>
        /// Gets the players by ID.
        /// </summary>
        IDictionary<int, IPlayer> PlayersByID { get; }

        /// <summary>
        /// Gets the players by name.
        /// </summary>
        IDictionary<string, IPlayer> PlayersByName { get; }

        /// <summary>
        /// Gets the players by ally ID.
        /// </summary>
        IDictionary<int, IList<IPlayer>> PlayersByAllyID { get; }

        /// <summary>
        /// Gets a value indicating whether this instance is empty.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance is empty; otherwise, <c>false</c>.
        /// </value>
        bool IsEmpty { get; }

        /// <summary>
        /// Gets the values.
        /// </summary>
        ICollection<IPlayer> Values { get; }

        /// <summary>
        /// Adds the specified player.
        /// </summary>
        /// <param name="player">The player.</param>
        void Add(IPlayer player);

        /// <summary>
        /// Determines whether this instance contains the specified player.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <returns>
        ///   <c>true</c> if this instance contains the specified player; otherwise, <c>false</c>.
        /// </returns>
        bool Contains(IPlayer player);

        /// <summary>
        /// Removes the specified player.
        /// </summary>
        /// <param name="player">The player.</param>
        void Remove(IPlayer player);
    }
}